<?php
/**
 * Model dla klasy ProductRanking
 *
 * @author ModGen
 */

class ProductRanking extends DataObject{


	/**
	 * nazwa tabeli
	 */
	static $tableName = 'product_ranking';

	/**
	 * nazwa klucza tabeli
	 */
	static $classTablePK = 'id_product_ranking';

	/**
	 * nazwa klasy
	 */
	static $className = __CLASS__;

	/**
	 * tablica mapująca pola klasy
	 */
	static $fields = array(
		'id_product_ranking' => 'id',
		'id_product' => 'idProduct',
		'id_category' => 'idCategory',
		'popularity' => 'popularity',
		'rate' => 'rate',
		'type' => 'type'
	);


	protected $id;
	private $idProduct;
	private $idCategory;
	private $popularity;
	private $rate;
	private $type;



	// -- Konstruktor --


	function __construct( $id = -1 , $idProduct = null, $idCategory = null, $popularity = null, $rate = null, $type = null){
		$this->id = $id;
		$this->idProduct = $idProduct;
		$this->idCategory = $idCategory;
		$this->popularity = $popularity;
		$this->rate = $rate;
		$this->type = $type;
	}



	// -- Get-y i Set-y --

	public function getId(){
		return $this->id;
	}

	public function setId($id){
		$this->id = $id;
	}

	
	public function getIdProduct(){
		return $this->idProduct;
	}

	public function setIdProduct($idProduct){
		$this->idProduct = $idProduct;
	}

	
	public function getIdCategory(){
		return $this->idCategory;
	}

	public function setIdCategory($idCategory){
		$this->idCategory = $idCategory;
	}

	
	public function getPopularity(){
		return $this->popularity;
	}

	public function setPopularity($popularity){
		$this->popularity = $popularity;
	}

	
	public function getRate(){
		return $this->rate;
	}

	public function setRate($rate){
		$this->rate = $rate;
	}

	
	public function getType(){
		return $this->type;
	}

	public function setType($type){
		$this->type = $type;
	}

	




	/**
	* Pobiera nazwę tabeli reprezentującej obiekt w SQL
	* @return string
	*/
	public  function GetTableName(){
	return self::$tableName;
	}

	/**
	* Pobiera nazwę klucza głównego tabeli
	* @return string
	*/
	public function GetClassTablePK() {
		return self::$classTablePK;
	}

	/**
	* Pobiera tablice mapującą pola klasy na pola tabeli
	* @return array
	*/
	public  function GetFields(){
		return self::$fields;
	}

	/**
	* Pobiera nazwę klasy
	* @return string
	*/
	public  function GetClassName(){
		return self::$className;
	}



}
?>